<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="/public/css/css.css" />
</head>
<body>
    
    {% include "nav.html" %}

    <div id="main">
        
       <div id="login" class="panel">
           <h2>添加新商品</h2>
           <form action="/additem" method="post">
                <div class="form-item">
                    <label>
                        <span class="txt">分类：</span>
                        <select name="category_id">
                            {% for category in categories %}
                                <option value="{{category.id}}">{{category.name}}</option>
                            {% endfor %}
                        </select>
                    </label>
                </div>
                <div class="form-item">
                    <label>
                        <span class="txt">名称：</span>
                        <input type="text" name="name" class="form-input">
                    </label>
                </div>
                <div class="form-item">
                    <label>
                        <span class="txt">价格：</span>
                        <input type="text" name="price" class="form-input">
                    </label>
                </div>
                <div class="form-item">
                    <label>
                        <span class="txt">封面：</span>
                        <!-- <input type="text" name="cover" class="form-input"> -->
                        <div class="form-button primary">
                            请选择一张封面图片进行上传
                            <input type="file" name="cover" style="display: none;" />
                        </div>
                    </label>
                </div>
                <div class="form-item">
                    <label>
                        <span class="txt"></span>
                        <button class="form-button success">添加</button>
                    </label>
                </div>
           </form>
       </div>    

    </div>

</body>
</html>